home *** CD-ROM | disk | FTP | other *** search
- Name
-
- SGIS_fog_function
-
- Name Strings
-
- GL_SGIS_fog_function
-
- Version
-
- $Date: 1996/04/01 23:22:45 $ $Revision: 1.1 $
-
- Number
-
- 64
-
- Dependencies
-
- XXX
-
- Overview
-
- This extension allows to define application-specific fog blend-factor
- function. Function is defined by the set of the "control" points and
- should be monotonic. Each control point represented as a pair of the
- eye-space distance value and corresponding value of the fog blending
- factor. The minimum number of control points is one. The maximum
- number is implementation dependent.
-
-
- New Procedures and Functions
-
- void FogFuncSGIS(sizei n,
- const float* points);
-
- New Tokens
-
- Accepted by the <param> parameter of Fogf and Fogi, and by the <params>
- parameter of Fogiv and Fogfv, when their <pname> parameter is FOG_MODE:
-
- FOG_FUNC_SGIS
-
- Accepted by the <pname> parameter of GetBooleanv, GetDoublev,
- GetIntegerv, and GetFloatv:
-
- FOG_FUNC_POINTS_SGIS
- MAX_FOG_FUNC_POINTS_SGIS
-
- Accepted by the <pname> parameter of GetDoublev, and GetFloatv:
-
- FOG_FUNC_SGIS
-
- May be returned by GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv
- when their <pname> parameter is FOG_MODE:
-
- FOG_FUNC_SGIS
-
-
- Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
-
- None
-
- Additions to Chapter 3 of the 1.0 Specification (Rasterization)
-
-
- 3.9 Fog
-
- The function for computing blending factor may be specified by calling
- FogFuncSGIS with <points> pointing at an array of pairs of floating point
- values, and <n> set to the number of value pairs in <points>. The first
- value of each value pair in <points> specifies a value of eye-space
- distance (should be not negative), and the second value of each value pair
- specifies the corresponding value of the fog blend factor (should be in
- [0.0, 1.0] range). The order in which the points are specified is
- significant (if there is more then one point) based on the following
- requirements: 1. distance value of each point is not smaller then the
- distance value of its predecessor; 2. fog factor value of each point is
- not bigger then the fog factor value of its predecessor. The <n> value
- pairs in <points> completely specify the function, replacing any previous
- specification that may have existed. At least one control point should be
- specified. The maximum number of control points is implementation dependent
- and may be inquired by Get commands. Initially fog function defined by a
- single point (0.0, 1.0).
-
- Fog factor function is evaluated by fitting a curve through the points
- specified by FogFuncSGIS. This curve may be linear between adjacent points,
- or it may be smoothed, but it will pass exactly through the points, limited
- only by the resolution of the implementation. The value pair with the
- lowest distance value specifies the fog function value for all values of
- distance less than or equal to that pair's distance. Likewise, the value
- pair with the greatest distance value specifies the function value for
- all values of distance greater than or equal to that pair's distance.
-
- If <pname> is FOG_MODE, and <param> is, or <params> point to an
- integer FOG_FUNC_SGIS then application specified fog factor function is
- selected for the fog calculation.
-
-
-
- Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
- and the Framebuffer)
-
- None
-
- Additions to Chapter 5 of the 1.0 Specification (Special Functions)
-
- None
-
- Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
-
- The max allowed number of points in the fog factor function specification
- of a fog is queried by calling GetBooleanv, GetIntegerv, GetFloatv,
- and GetDoublev with <pname> set to MAX_FOG_FUNC_POINTS_SGIS.
- The number of points in the current fog factor function is queried by
- calling GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev with <pname>
- set to FOG_FUNC_POINTS_SGIS. All the points of the current fog factor
- function are queried by calling GetFloatv or GetDoublev with <pname> set
- to FOG_FUNC_SGIS. Points are returned in the same format as they are
- specified in the glFogFuncSGIS function.
-
- Additions to the GLX Specification
-
- None
-
- Errors
-
- INVALID_VALUE is generated if FogFuncSGIS parameter <n> is
- negative.
-
- INVALID_VALUE is generated if fog factor value out of [0.0, 1.0]
- range.
-
- INVALID_VALUE is generated if eye spce-distance is less then zero.
-
- INVALID_VALUE is generated if specified control points don't confirm
- with order requirements.
-
- INVALID_OPERATION is generated if FogFuncSGIS is executed between
- execution of Begin and the corresponding execution to End.
-
- New State
-
- Get Value Get Command Type Initial Value Attribute
- --------- ----------- ---- ------------- ---------
- MAX_FOG_FUNC_POINTS_SGIS GetIntegerv Z+ XXX fog
- FOG_FUNC_POINTS_SGIS GetIntegerv Z+ 1 fog
- FOG_FUNC_SGIS GetFloatv 2 x n x R+ (0.0, 1.0) fog
-
- New Implementation Dependent State
-
- None
-